package com.demo.consumer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.demo.entity.User;
import com.demo.service.UserService;

public class Consumer {
	public static void main(String[] args) throws InterruptedException {
		ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:consumer.xml");
		//获取代理对象
		UserService userService = (UserService)applicationContext.getBean("userService");
		User user = userService.getUser();
		System.out.println(user);
		Thread.sleep(100000);
	}
}
